from google.appengine.ext import db
from django.utils import simplejson

class YTJSON(db.Model):
    category = db.StringProperty(multiline=False)
    date = db.DateProperty(auto_now_add=True)
    time = db.DateTimeProperty(auto_now=True)
    json = db.TextProperty()
    
    def get_obj(self):
        return simplejson.loads(self.json)
    
    def set_obj(self, obj):
        self.json = simplejson.dumps(obj) 
